/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 * @lint-ignore-every XPLATJSCOPYRIGHT1
 */

import React, {Component} from 'react';
import {StackNavigator} from 'react-navigation'
import RouteConfig from './src/RoutesScreen'
import CardStackStyleInterpolator from 'react-navigation/src/views/CardStack/CardStackStyleInterpolator'


// import {Platform, StyleSheet, Text, View} from 'react-native';
// import Home from './src/pages/Home/Home'
// const instructions = Platform.select({
//   ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
//   android:
//     'Double tap R on your keyboard to reload,\n' +
//     'Shake or press menu button for dev menu',
// });
const Navigator = StackNavigator(RouteConfig, {
  mode: 'card',  // 页面切换模式, 左右是card(相当于iOS中的push效果), 上下是modal(相当于iOS中的modal效果)
  headerMode: 'screen', // 导航栏的显示模式, screen: 有渐变透明效果, float: 无透明效果, none: 隐藏导航栏
  // android 页面切换模式, 左右是card(相当于iOS中的push效果),
  transitionConfig: () => ({
    screenInterpolator: CardStackStyleInterpolator.forHorizontal,
  })
  //onTransitionStart: ()=>{ alert('导航栏切换开始'); },  // 回调
  //onTransitionEnd: ()=>{ alert('导航栏切换结束'); }  // 回调
});

type Props = {};
export default class App extends Component<Props> {
  componentWillMount(): void {
    console.log(12222222222);
  }

  render() {
    return (
        <Navigator/>
    );
  }
}
